#define  _CRT_SECURE_NO_WARNINGS
#include "tree.h"
void GetCount(struct TreeNode* root, int* count)
{
    if (root == NULL)
    {
        return;
    }
    (*count)++;
    GetCount(root->left, count);
    GetCount(root->right, count);
}
int countNodes(struct TreeNode* root)
{
    int count = 0;
    GetCount(root, &count);
    return count;
}
int main()
{
    struct TreeNode* root = CreatTree();
    LevelOrder(root);
    printf("%d\n", countNodes(root));
    return 0;
}